﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/Nurse/Nurse.master"
    AutoEventWireup="true" CodeFile="Registration.aspx.cs" Inherits="Management_Nurse_Nurse" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/DatePicker.ascx" TagName="DatePicker" TagPrefix="uc1" %>
<%@ Register Src="../Sex.ascx" TagName="Sex" TagPrefix="uc2" %>
<%@ Register Src="../MaritalStatus.ascx" TagName="MaritalStatus" TagPrefix="uc3" %>
<%@ Register Src="../Danhsachnhanvien.ascx" TagName="Danhsachnhanvien" TagPrefix="uc4" %>
<%@ Register Src="../Room.ascx" TagName="Room" TagPrefix="uc5" %>
<%@ Register Src="../Ward.ascx" TagName="Ward" TagPrefix="uc6" %>
<%@ Register Src="../PersonnelOfficer/DatePicker.ascx" TagName="DatePicker" TagPrefix="uc7" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="background-color: #FFFFFF">
        </br>
        <div style="text-align: center; font-size: 30px; color: Teal; font-weight: bold;
            margin: 20px;">
            BỆNH NHÂN KHÁM CHỮA BỆNH<br />
        </div>
        <div style="padding-left: 50px">
            <table cellpadding="20px" cellspacing="20px" width="100%">
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="Tìm bệnh nhân theo mã"></asp:Label>
                    </td>
                    <td style="width: 154px">
                        <asp:TextBox ID="tbPatientID" runat="server"></asp:TextBox>
                    </td>
                    <td style="width: 19px">
                        <asp:Button ID="btFind" runat="server" Text="Tìm" OnClick="btFind_Click" Height="32px"
                            Width="81px" />
                    </td>
                    <td>
                        <asp:Button ID="btAddPatient" runat="server" Text="Bệnh nhân mới" Height="32px" OnClick="btAddPatient_Click" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            DataSourceID="benhnhanDS" ForeColor="#333333" GridLines="None" Width="414px">
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                            <Columns>
                                <asp:TemplateField HeaderText="Họ và tên" SortExpression="FirstName">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("FirstName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("FirstName") + " " +Eval("LastName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Địa chỉ" SortExpression="Address">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Address") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("Address") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ngày sinh" SortExpression="DOB">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DOB") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("DOB", "{0: dd/MM/yyyy}") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <EditRowStyle BackColor="#999999" />
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#E9E7E2" />
                            <SortedAscendingHeaderStyle BackColor="#506C8C" />
                            <SortedDescendingCellStyle BackColor="#FFFDF8" />
                            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                        </asp:GridView>
                        <asp:SqlDataSource ID="benhnhanDS" runat="server" ConnectionString="<%$ ConnectionStrings:HOSPITALMANAGEMENTConnectionString %>"
                            SelectCommand="SELECT [FirstName], [LastName], [Address], [DOB] FROM [tbPatient] WHERE ([ID] = @ID)">
                            <SelectParameters>
                                <asp:FormParameter FormField="ID" Name="ID" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                    <td>
                        <asp:Panel runat="server" ID="pnAddPatient" Visible="false">
                            <table width="100%">
                                <tr>
                                    <td style="width: 124px">
                                        <asp:Label ID="Label4" runat="server" Text="Họ"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbFirstName" runat="server" Height="28px" Width="168px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 124px">
                                        <asp:Label ID="Label5" runat="server" Text="Tên"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbLastName" runat="server" Height="25px" Width="165px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 124px">
                                        <asp:Label ID="Label6" runat="server" Text="Địa chỉ"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbAddress" runat="server" Height="52px" TextMode="MultiLine" Width="232px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 124px">
                                        <asp:Label ID="Label7" runat="server" Text="Giới tính"></asp:Label>
                                    </td>
                                    <td>
                                        <uc2:Sex ID="Sex1" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 124px">
                                        <asp:Label ID="Label8" runat="server" Text="Số điện thoại"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbTel" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 124px">
                                        <asp:Label ID="Label9" runat="server" Text="Ngày sinh"></asp:Label>
                                    </td>
                                    <td>
                                        <uc1:DatePicker ID="DatePicker1" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 124px">
                                        <asp:Label ID="Label10" runat="server" Text="Tình trạng hôn nhân"></asp:Label>
                                    </td>
                                    <td>
                                        <uc3:MaritalStatus ID="MaritalStatus1" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <asp:Button ID="btAddPatientWithValue" runat="server" Text="Thêm" Height="28px" Width="118px"
                                            OnClick="btAddPatientWithValue_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                        <asp:Button ID="btAddApp" runat="server" Text="Khám bệnh" OnClick="btAddApp_Click"
                            Visible="false" />
                    </td>
                    <td style="width: 154px">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:Panel runat="server" ID="pnKhambenh" Visible="false">
                            <table width="100%">
                                <tr>
                                    <td>
                                        <asp:Label ID="Label14" runat="server" Text="Bác sĩ giới thiệu"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbLFullName" runat="server" Height="23px" Width="253px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label15" runat="server" Text="Số phòng khám"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbLClinicNo" runat="server" Height="23px" Width="253px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label16" runat="server" Text="Địa chỉ"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbLAddress" runat="server" Height="66px" TextMode="MultiLine" Width="252px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label18" runat="server" Text="Số điện thoại"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbLTel" runat="server" Height="23px" Width="253px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label11" runat="server" Text="Y sỹ khám bệnh"></asp:Label>
                                    </td>
                                    <td>
                                        <uc4:Danhsachnhanvien ID="Danhsachnhanvien1" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label12" runat="server" Text="Phòng khám"></asp:Label>
                                    </td>
                                    <td>
                                        <uc5:Room ID="Room1" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <br />
                                        <asp:Button ID="btImpatient" runat="server" Text="Nhập viện" OnClick="btImpatient_Click" />
                                    </td>
                                    <td>
                                        <br />
                                        <asp:Button ID="btOutpatient" runat="server" Text="Khám ngoại trú" OnClick="btOutpatient_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:Panel runat="server" ID="pnNhapvien" Visible="false">
                            <table width="100%">
                                <tr>
                                    <td>
                                        <asp:Label runat="server" ID="lbxxx" Text="THÔNG TIN NHẬP VIỆN"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label13" runat="server" Text="Khoa"></asp:Label>
                                    </td>
                                    <td>
                                        <uc6:Ward ID="Ward1" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label17" runat="server" Text="Số ngày dự kiến"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbExpectedDuration" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label19" runat="server" Text="Ngày xuất viện dự kiến"></asp:Label>
                                    </td>
                                    <td>
                                        <uc7:DatePicker ID="DatePicker2" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label20" runat="server" Text="THÂN NHÂN"></asp:Label>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label21" runat="server" Text="Họ và tên"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbNFullName" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label22" runat="server" Text="Quan hệ"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbNRelationship" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label23" runat="server" Text="Địa chỉ"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbNAddress" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="Label24" runat="server" Text="Số điện thoại"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="tbNTel" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <br />
                                        <asp:Button ID="btSave" runat="server" Text="Lưu hồ sơ" OnClick="btSave_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
